using System;
using System.Collections.Generic;
using UMC.Data;
namespace UMC.Wiki.Entities
{
public partial class ProjectReader
{
readonly static Action<ProjectReader,object>[] _SetValues=new Action<ProjectReader,object>[]{(r,t)=>r.Alias=Reflection.ParseObject(t, r.Alias),(r,t)=>r.IsUser=Reflection.ParseObject(t, r.IsUser),(r,t)=>r.JoinTime=Reflection.ParseObject(t, r.JoinTime),(r,t)=>r.Price=Reflection.ParseObject(t, r.Price),(r,t)=>r.project_id=Reflection.ParseObject(t, r.project_id),(r,t)=>r.reader_id=Reflection.ParseObject(t, r.reader_id)};
readonly static string[] _Columns=new string[]{"Alias","IsUser","JoinTime","Price","project_id","reader_id"};
protected override void SetValue(string name, object obv){
var index = Utility.Search(_Columns,name, StringComparer.CurrentCultureIgnoreCase);
if (index > -1)_SetValues[index](this, obv);
}
protected override void GetValues(Action<String, object> action){
AppendValue(action,"Alias", this.Alias);
AppendValue(action,"IsUser", this.IsUser);
AppendValue(action,"JoinTime", this.JoinTime);
AppendValue(action,"Price", this.Price);
AppendValue(action,"project_id", this.project_id);
AppendValue(action,"reader_id", this.reader_id);
}

 protected override RecordColumn[] GetColumns(){
 var cols = new RecordColumn[6];
cols[0]= RecordColumn.Column("Alias",this.Alias);
cols[1]= RecordColumn.Column("IsUser",this.IsUser);
cols[2]= RecordColumn.Column("JoinTime",this.JoinTime);
cols[3]= RecordColumn.Column("Price",this.Price);
cols[4]= RecordColumn.Column("project_id",this.project_id);
cols[5]= RecordColumn.Column("reader_id",this.reader_id);
return cols;
}

}
}

